\(\int \frac {\cos (c+d x) (B \cos (c+d x)+C \cos ^2(c+d x))}{(a+b \cos (c+d x))^3} \, dx\) [809]
Optimal result
Integrand size = 38, antiderivative size = 211 \[
\int \frac {\cos (c+d x) \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^3} \, dx=\frac {C x}{b^3}+\frac {\left (a^2 b^3 B+2 b^5 B-2 a^5 C+5 a^3 b^2 C-6 a b^4 C\right ) \arctan \left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{(a-b)^{5/2} b^3 (a+b)^{5/2} d}-\frac {a^2 (b B-a C) \sin (c+d x)}{2 b^2 \left (a^2-b^2\right ) d (a+b \cos (c+d x))^2}+\frac {a \left (a^2 b B-4 b^3 B-3 a^3 C+6 a b^2 C\right ) \sin (c+d x)}{2 b^2 \left (a^2-b^2\right )^2 d (a+b \cos (c+d x))}
\]
[Out]
C*x/b^3+(B*a^2*b^3+2*B*b^5-2*C*a^5+5*C*a^3*b^2-6*C*a*b^4)*arctan((a-b)^(1/2)*tan(1/2*d*x+1/2*c)/(a+b)^(1/2))/(
a-b)^(5/2)/b^3/(a+b)^(5/2)/d-1/2*a^2*(B*b-C*a)*sin(d*x+c)/b^2/(a^2-b^2)/d/(a+b*cos(d*x+c))^2+1/2*a*(B*a^2*b-4*
B*b^3-3*C*a^3+6*C*a*b^2)*sin(d*x+c)/b^2/(a^2-b^2)^2/d/(a+b*cos(d*x+c))
Rubi [A] (verified)
Time = 0.72 (sec) , antiderivative size = 211, normalized size of antiderivative = 1.00, number of
steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {3108, 3067, 3100, 2814, 2738,
211} \[
\int \frac {\cos (c+d x) \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^3} \, dx=-\frac {a^2 (b B-a C) \sin (c+d x)}{2 b^2 d \left (a^2-b^2\right ) (a+b \cos (c+d x))^2}+\frac {a \left (-3 a^3 C+a^2 b B+6 a b^2 C-4 b^3 B\right ) \sin (c+d x)}{2 b^2 d \left (a^2-b^2\right )^2 (a+b \cos (c+d x))}+\frac {\left (-2 a^5 C+5 a^3 b^2 C+a^2 b^3 B-6 a b^4 C+2 b^5 B\right ) \arctan \left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{b^3 d (a-b)^{5/2} (a+b)^{5/2}}+\frac {C x}{b^3}
\]
[In]
Int[(Cos[c + d*x]*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/(a + b*Cos[c + d*x])^3,x]
[Out]
(C*x)/b^3 + ((a^2*b^3*B + 2*b^5*B - 2*a^5*C + 5*a^3*b^2*C - 6*a*b^4*C)*ArcTan[(Sqrt[a - b]*Tan[(c + d*x)/2])/S
qrt[a + b]])/((a - b)^(5/2)*b^3*(a + b)^(5/2)*d) - (a^2*(b*B - a*C)*Sin[c + d*x])/(2*b^2*(a^2 - b^2)*d*(a + b*
Cos[c + d*x])^2) + (a*(a^2*b*B - 4*b^3*B - 3*a^3*C + 6*a*b^2*C)*Sin[c + d*x])/(2*b^2*(a^2 - b^2)^2*d*(a + b*Co
s[c + d*x]))
Rule 211
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]
Rule 2738
Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x
]}, Dist[2*(e/d), Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}
, x] && NeQ[a^2 - b^2, 0]
Rule 2814
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[b*(x/d)
, x] - Dist[(b*c - a*d)/d, Int[1/(c + d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d
, 0]
Rule 3067
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^2*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.)
+ (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(B*c - A*d)*(b*c - a*d)^2*Cos[e + f*x]*((c + d*Sin[e + f*x])^(n + 1)/(
f*d^2*(n + 1)*(c^2 - d^2))), x] - Dist[1/(d^2*(n + 1)*(c^2 - d^2)), Int[(c + d*Sin[e + f*x])^(n + 1)*Simp[d*(n
+ 1)*(B*(b*c - a*d)^2 - A*d*(a^2*c + b^2*c - 2*a*b*d)) - ((B*c - A*d)*(a^2*d^2*(n + 2) + b^2*(c^2 + d^2*(n +
1))) + 2*a*b*d*(A*c*d*(n + 2) - B*(c^2 + d^2*(n + 1))))*Sin[e + f*x] - b^2*B*d*(n + 1)*(c^2 - d^2)*Sin[e + f*x
]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d
^2, 0] && LtQ[n, -1]
Rule 3100
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f
_.)*(x_)]^2), x_Symbol] :> Simp[(-(A*b^2 - a*b*B + a^2*C))*Cos[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m
+ 1)*(a^2 - b^2))), x] + Dist[1/(b*(m + 1)*(a^2 - b^2)), Int[(a + b*Sin[e + f*x])^(m + 1)*Simp[b*(a*A - b*B +
a*C)*(m + 1) - (A*b^2 - a*b*B + a^2*C + b*(A*b - a*B + b*C)*(m + 1))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b,
e, f, A, B, C}, x] && LtQ[m, -1] && NeQ[a^2 - b^2, 0]
Rule 3108
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((A_.) + (B_.)
*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Dist[1/b^2, Int[(a + b*Sin[e + f*x])
^(m + 1)*(c + d*Sin[e + f*x])^n*(b*B - a*C + b*C*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C, m,
n}, x] && NeQ[b*c - a*d, 0] && EqQ[A*b^2 - a*b*B + a^2*C, 0]
Rubi steps \begin{align*}
\text {integral}& = \int \frac {\cos ^2(c+d x) (B+C \cos (c+d x))}{(a+b \cos (c+d x))^3} \, dx \\ & = -\frac {a^2 (b B-a C) \sin (c+d x)}{2 b^2 \left (a^2-b^2\right ) d (a+b \cos (c+d x))^2}+\frac {\int \frac {2 a b (b B-a C)+\left (a^2-2 b^2\right ) (b B-a C) \cos (c+d x)+2 b \left (a^2-b^2\right ) C \cos ^2(c+d x)}{(a+b \cos (c+d x))^2} \, dx}{2 b^2 \left (a^2-b^2\right )} \\ & = -\frac {a^2 (b B-a C) \sin (c+d x)}{2 b^2 \left (a^2-b^2\right ) d (a+b \cos (c+d x))^2}+\frac {a \left (a^2 b B-4 b^3 B-3 a^3 C+6 a b^2 C\right ) \sin (c+d x)}{2 b^2 \left (a^2-b^2\right )^2 d (a+b \cos (c+d x))}-\frac {\int \frac {-b^2 \left (a^2 b B+2 b^3 B+a^3 C-4 a b^2 C\right )-2 b \left (a^2-b^2\right )^2 C \cos (c+d x)}{a+b \cos (c+d x)} \, dx}{2 b^3 \left (a^2-b^2\right )^2} \\ & = \frac {C x}{b^3}-\frac {a^2 (b B-a C) \sin (c+d x)}{2 b^2 \left (a^2-b^2\right ) d (a+b \cos (c+d x))^2}+\frac {a \left (a^2 b B-4 b^3 B-3 a^3 C+6 a b^2 C\right ) \sin (c+d x)}{2 b^2 \left (a^2-b^2\right )^2 d (a+b \cos (c+d x))}+\frac {\left (a^2 b^3 B+2 b^5 B-2 a^5 C+5 a^3 b^2 C-6 a b^4 C\right ) \int \frac {1}{a+b \cos (c+d x)} \, dx}{2 b^3 \left (a^2-b^2\right )^2} \\ & = \frac {C x}{b^3}-\frac {a^2 (b B-a C) \sin (c+d x)}{2 b^2 \left (a^2-b^2\right ) d (a+b \cos (c+d x))^2}+\frac {a \left (a^2 b B-4 b^3 B-3 a^3 C+6 a b^2 C\right ) \sin (c+d x)}{2 b^2 \left (a^2-b^2\right )^2 d (a+b \cos (c+d x))}+\frac {\left (a^2 b^3 B+2 b^5 B-2 a^5 C+5 a^3 b^2 C-6 a b^4 C\right ) \text {Subst}\left (\int \frac {1}{a+b+(a-b) x^2} \, dx,x,\tan \left (\frac {1}{2} (c+d x)\right )\right )}{b^3 \left (a^2-b^2\right )^2 d} \\ & = \frac {C x}{b^3}+\frac {\left (a^2 b^3 B+2 b^5 B-2 a^5 C+5 a^3 b^2 C-6 a b^4 C\right ) \arctan \left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{(a-b)^{5/2} b^3 (a+b)^{5/2} d}-\frac {a^2 (b B-a C) \sin (c+d x)}{2 b^2 \left (a^2-b^2\right ) d (a+b \cos (c+d x))^2}+\frac {a \left (a^2 b B-4 b^3 B-3 a^3 C+6 a b^2 C\right ) \sin (c+d x)}{2 b^2 \left (a^2-b^2\right )^2 d (a+b \cos (c+d x))} \\
\end{align*}
Mathematica [A] (verified)
Time = 2.35 (sec) , antiderivative size = 204, normalized size of antiderivative = 0.97
\[
\int \frac {\cos (c+d x) \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^3} \, dx=\frac {2 C (c+d x)+\frac {2 \left (-a^2 b^3 B-2 b^5 B+2 a^5 C-5 a^3 b^2 C+6 a b^4 C\right ) \text {arctanh}\left (\frac {(a-b) \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {-a^2+b^2}}\right )}{\left (-a^2+b^2\right )^{5/2}}+\frac {a^2 b (-b B+a C) \sin (c+d x)}{(a-b) (a+b) (a+b \cos (c+d x))^2}+\frac {a b \left (a^2 b B-4 b^3 B-3 a^3 C+6 a b^2 C\right ) \sin (c+d x)}{(a-b)^2 (a+b)^2 (a+b \cos (c+d x))}}{2 b^3 d}
\]
[In]
Integrate[(Cos[c + d*x]*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/(a + b*Cos[c + d*x])^3,x]
[Out]
(2*C*(c + d*x) + (2*(-(a^2*b^3*B) - 2*b^5*B + 2*a^5*C - 5*a^3*b^2*C + 6*a*b^4*C)*ArcTanh[((a - b)*Tan[(c + d*x
)/2])/Sqrt[-a^2 + b^2]])/(-a^2 + b^2)^(5/2) + (a^2*b*(-(b*B) + a*C)*Sin[c + d*x])/((a - b)*(a + b)*(a + b*Cos[
c + d*x])^2) + (a*b*(a^2*b*B - 4*b^3*B - 3*a^3*C + 6*a*b^2*C)*Sin[c + d*x])/((a - b)^2*(a + b)^2*(a + b*Cos[c
+ d*x])))/(2*b^3*d)
Maple [A] (verified)
Time = 1.27 (sec) , antiderivative size = 282, normalized size of antiderivative = 1.34
| | |
method | result | size |
| | |
derivativedivides |
\(\frac {\frac {\frac {2 \left (-\frac {\left (B a \,b^{2}+4 B \,b^{3}+2 C \,a^{3}-C \,a^{2} b -6 C a \,b^{2}\right ) a b \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 \left (a^{2}+2 a b +b^{2}\right ) \left (a -b \right )}+\frac {b a \left (B a \,b^{2}-4 B \,b^{3}-2 C \,a^{3}-C \,a^{2} b +6 C a \,b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 \left (a +b \right ) \left (a -b \right )^{2}}\right )}{{\left (\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a -b \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+a +b \right )}^{2}}+\frac {\left (B \,a^{2} b^{3}+2 B \,b^{5}-2 C \,a^{5}+5 C \,a^{3} b^{2}-6 C a \,b^{4}\right ) \arctan \left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{\left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) \sqrt {\left (a -b \right ) \left (a +b \right )}}}{b^{3}}+\frac {2 C \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{b^{3}}}{d}\) |
\(282\) |
default |
\(\frac {\frac {\frac {2 \left (-\frac {\left (B a \,b^{2}+4 B \,b^{3}+2 C \,a^{3}-C \,a^{2} b -6 C a \,b^{2}\right ) a b \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 \left (a^{2}+2 a b +b^{2}\right ) \left (a -b \right )}+\frac {b a \left (B a \,b^{2}-4 B \,b^{3}-2 C \,a^{3}-C \,a^{2} b +6 C a \,b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 \left (a +b \right ) \left (a -b \right )^{2}}\right )}{{\left (\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a -b \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+a +b \right )}^{2}}+\frac {\left (B \,a^{2} b^{3}+2 B \,b^{5}-2 C \,a^{5}+5 C \,a^{3} b^{2}-6 C a \,b^{4}\right ) \arctan \left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{\left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) \sqrt {\left (a -b \right ) \left (a +b \right )}}}{b^{3}}+\frac {2 C \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{b^{3}}}{d}\) |
\(282\) |
risch |
\(\text {Expression too large to display}\) |
\(1180\) |
| | |
|
|
|
[In]
int(cos(d*x+c)*(B*cos(d*x+c)+C*cos(d*x+c)^2)/(a+cos(d*x+c)*b)^3,x,method=_RETURNVERBOSE)
[Out]
1/d*(2/b^3*((-1/2*(B*a*b^2+4*B*b^3+2*C*a^3-C*a^2*b-6*C*a*b^2)*a*b/(a^2+2*a*b+b^2)/(a-b)*tan(1/2*d*x+1/2*c)^3+1
/2*b*a*(B*a*b^2-4*B*b^3-2*C*a^3-C*a^2*b+6*C*a*b^2)/(a+b)/(a-b)^2*tan(1/2*d*x+1/2*c))/(tan(1/2*d*x+1/2*c)^2*a-b
*tan(1/2*d*x+1/2*c)^2+a+b)^2+1/2*(B*a^2*b^3+2*B*b^5-2*C*a^5+5*C*a^3*b^2-6*C*a*b^4)/(a^4-2*a^2*b^2+b^4)/((a-b)*
(a+b))^(1/2)*arctan((a-b)*tan(1/2*d*x+1/2*c)/((a-b)*(a+b))^(1/2)))+2*C/b^3*arctan(tan(1/2*d*x+1/2*c)))
Fricas [B] (verification not implemented)
Leaf count of result is larger than twice the leaf count of optimal. 542 vs. \(2 (201) = 402\).
Time = 0.35 (sec) , antiderivative size = 1152, normalized size of antiderivative = 5.46
\[
\int \frac {\cos (c+d x) \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^3} \, dx=\text {Too large to display}
\]
[In]
integrate(cos(d*x+c)*(B*cos(d*x+c)+C*cos(d*x+c)^2)/(a+b*cos(d*x+c))^3,x, algorithm="fricas")
[Out]
[1/4*(4*(C*a^6*b^2 - 3*C*a^4*b^4 + 3*C*a^2*b^6 - C*b^8)*d*x*cos(d*x + c)^2 + 8*(C*a^7*b - 3*C*a^5*b^3 + 3*C*a^
3*b^5 - C*a*b^7)*d*x*cos(d*x + c) + 4*(C*a^8 - 3*C*a^6*b^2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5 + 6*C*a*b^6 - 2*B*b^7)*cos(d*x + c)^2 + 2*(2*C
*a^6*b - 5*C*a^4*b^3 - B*a^3*b^4 + 6*C*a^2*b^5 - 2*B*a*b^6)*cos(d*x + c))*sqrt(a^2 - b^2)*arctan(-(a*cos(d*x +
c) + b)/(sqrt(a^2 - b^2)*sin(d*x + c))) - (2*C*a^7*b - 7*C*a^5*b^3 + 3*B*a^4*b^4 + 5*C*a^3*b^5 - 3*B*a^2*b^6
+ (3*C*a^6*b^2 - B*a^5*b^3 - 9*C*a^4*b^4 + 5*B*a^3*b^5 + 6*C*a^2*b^6 - 4*B*a*b^7)*cos(d*x + c))*sin(d*x + c))/
((a^6*b^5 - 3*a^4*b^7 + 3*a^2*b^9 - b^11)*d*cos(d*x + c)^2 + 2*(a^7*b^4 - 3*a^5*b^6 + 3*a^3*b^8 - a*b^10)*d*co
s(d*x + c) + (a^8*b^3 - 3*a^6*b^5 + 3*a^4*b^7 - a^2*b^9)*d)]
Sympy [F(-1)]
Timed out. \[
\int \frac {\cos (c+d x) \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^3} \, dx=\text {Timed out}
\]
[In]
integrate(cos(d*x+c)*(B*cos(d*x+c)+C*cos(d*x+c)**2)/(a+b*cos(d*x+c))**3,x)
[Out]
Timed out
Maxima [F(-2)]
Exception generated. \[
\int \frac {\cos (c+d x) \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^3} \, dx=\text {Exception raised: ValueError}
\]
[In]
integrate(cos(d*x+c)*(B*cos(d*x+c)+C*cos(d*x+c)^2)/(a+b*cos(d*x+c))^3,x, algorithm="maxima")
[Out]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*b^2-4*a^2>0)', see `assume?`
for more de
Giac [B] (verification not implemented)
Leaf count of result is larger than twice the leaf count of optimal. 455 vs. \(2 (201) = 402\).
Time = 0.38 (sec) , antiderivative size = 455, normalized size of antiderivative = 2.16
\[
\int \frac {\cos (c+d x) \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^3} \, dx=-\frac {\frac {{\left (2 \, C a^{5} - 5 \, C a^{3} b^{2} - B a^{2} b^{3} + 6 \, C a b^{4} - 2 \, B b^{5}\right )} {\left (\pi \left \lfloor \frac {d x + c}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (2 \, a - 2 \, b\right ) + \arctan \left (\frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\sqrt {a^{2} - b^{2}}}\right )\right )}}{{\left (a^{4} b^{3} - 2 \, a^{2} b^{5} + b^{7}\right )} \sqrt {a^{2} - b^{2}}} - \frac {{\left (d x + c\right )} C}{b^{3}} + \frac {2 \, C a^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 3 \, C a^{4} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + B a^{3} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 5 \, C a^{3} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 3 \, B a^{2} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 6 \, C a^{2} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 4 \, B a b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 2 \, C a^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, C a^{4} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - B a^{3} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 5 \, C a^{3} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, B a^{2} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 6 \, C a^{2} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 4 \, B a b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (a^{4} b^{2} - 2 \, a^{2} b^{4} + b^{6}\right )} {\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a + b\right )}^{2}}}{d}
\]
[In]
integrate(cos(d*x+c)*(B*cos(d*x+c)+C*cos(d*x+c)^2)/(a+b*cos(d*x+c))^3,x, algorithm="giac")
[Out]
-((2*C*a^5 - 5*C*a^3*b^2 - B*a^2*b^3 + 6*C*a*b^4 - 2*B*b^5)*(pi*floor(1/2*(d*x + c)/pi + 1/2)*sgn(2*a - 2*b) +
arctan((a*tan(1/2*d*x + 1/2*c) - b*tan(1/2*d*x + 1/2*c))/sqrt(a^2 - b^2)))/((a^4*b^3 - 2*a^2*b^5 + b^7)*sqrt(
a^2 - b^2)) - (d*x + c)*C/b^3 + (2*C*a^5*tan(1/2*d*x + 1/2*c)^3 - 3*C*a^4*b*tan(1/2*d*x + 1/2*c)^3 + B*a^3*b^2
*tan(1/2*d*x + 1/2*c)^3 - 5*C*a^3*b^2*tan(1/2*d*x + 1/2*c)^3 + 3*B*a^2*b^3*tan(1/2*d*x + 1/2*c)^3 + 6*C*a^2*b^
3*tan(1/2*d*x + 1/2*c)^3 - 4*B*a*b^4*tan(1/2*d*x + 1/2*c)^3 + 2*C*a^5*tan(1/2*d*x + 1/2*c) + 3*C*a^4*b*tan(1/2
*d*x + 1/2*c) - B*a^3*b^2*tan(1/2*d*x + 1/2*c) - 5*C*a^3*b^2*tan(1/2*d*x + 1/2*c) + 3*B*a^2*b^3*tan(1/2*d*x +
1/2*c) - 6*C*a^2*b^3*tan(1/2*d*x + 1/2*c) + 4*B*a*b^4*tan(1/2*d*x + 1/2*c))/((a^4*b^2 - 2*a^2*b^4 + b^6)*(a*ta
n(1/2*d*x + 1/2*c)^2 - b*tan(1/2*d*x + 1/2*c)^2 + a + b)^2))/d
Mupad [B] (verification not implemented)
Time = 11.65 (sec) , antiderivative size = 6923, normalized size of antiderivative = 32.81
\[
\int \frac {\cos (c+d x) \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^3} \, dx=\text {Too large to display}
\]
[In]
int((cos(c + d*x)*(B*cos(c + d*x) + C*cos(c + d*x)^2))/(a + b*cos(c + d*x))^3,x)
[Out]
(2*C*atan(-((C*((C*((8*(4*B*b^15 + 4*C*b^15 - 6*B*a^2*b^13 + 6*B*a^3*b^12 + 2*B*a^6*b^9 - 2*B*a^7*b^8 - 8*C*a^
2*b^13 + 34*C*a^3*b^12 + 6*C*a^4*b^11 - 36*C*a^5*b^10 - 4*C*a^6*b^9 + 18*C*a^7*b^8 + 2*C*a^8*b^7 - 4*C*a^9*b^6
- 4*B*a*b^14 - 12*C*a*b^14))/(a*b^12 + b^13 - 3*a^2*b^11 - 3*a^3*b^10 + 3*a^4*b^9 + 3*a^5*b^8 - a^6*b^7 - a^7
*b^6) - (C*tan(c/2 + (d*x)/2)*(8*a*b^15 - 8*a^2*b^14 - 32*a^3*b^13 + 32*a^4*b^12 + 48*a^5*b^11 - 48*a^6*b^10 -
32*a^7*b^9 + 32*a^8*b^8 + 8*a^9*b^7 - 8*a^10*b^6)*8i)/(b^3*(a*b^10 + b^11 - 3*a^2*b^9 - 3*a^3*b^8 + 3*a^4*b^7
+ 3*a^5*b^6 - a^6*b^5 - a^7*b^4)))*1i)/b^3 + (8*tan(c/2 + (d*x)/2)*(4*B^2*b^10 + 8*C^2*a^10 + 4*C^2*b^10 - 8*
C^2*a*b^9 - 8*C^2*a^9*b + 4*B^2*a^2*b^8 + B^2*a^4*b^6 + 24*C^2*a^2*b^8 + 32*C^2*a^3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